﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Gui/masterPage.Master" AutoEventWireup="true" CodeBehind="Voucher.aspx.cs" Inherits="OnlineStore.Gui.Voucher" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentLogin" runat="server">
    <asp:HyperLink ID="HL_tab_login"  NavigateUrl="/gui/Login.aspx" runat="server" ForeColor="Red">(Đăng nhập) </asp:HyperLink> |
    <asp:HyperLink ID="HL_tab_Logout"  Visible="false" runat="server" NavigateUrl="/gui/Login.aspx?logout=true">Đăng Xuất | </asp:HyperLink>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentCartRight" runat="server">
    <asp:GridView ID="ListCartRight" runat="server" AutoGenerateColumns="False"
           GridLines="None">
            <Columns>
                <asp:BoundField DataField="NumberOrder" SortExpression="NumberOrder" 
                    DataFormatString="{0} x " >
                
                <ControlStyle Width="10px" />
                </asp:BoundField>
                
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataTextField="Product_Name" 
                    DataNavigateUrlFormatString="/gui/ProductDetail.aspx?id={0}" />
            </Columns>
        </asp:GridView>
    <br>
    <table cellpadding="0" cellspacing="0" align="right" style="display:inline-block;">
     <tbody>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tiền hàng:</b></span></td>
            <td align="right">
                <asp:Label ID="lb_Sum_product" runat="server" CssClass="cart_module_total" >0 VNĐ</asp:Label>
             </td>
        </tr>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tổng cộng:</b></span></td>
            <td align="right"><span class="cart_module_total">
                <asp:Label ID="lb_Sum" runat="server" CssClass="cart_module_total">0 VNĐ</asp:Label></span></td>
        </tr>
     </tbody></table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentTitle" runat="server">
    <h1>Trang Quản lý Voucher</h1>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentCenter" runat="server">
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <p>Quản lý voucher</p>
        <asp:Label ID="lb_warning" CssClass="warning" Visible="false" runat="server" Text="Không thể thêm Voucher Vui lòng kiểm tra lại Key"></asp:Label>
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentTop" runat="server">
    <h1>Thêm Voucher</h1>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="MainContent" runat="server">
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        
        <table><tbody>
        <tr>
            <td>Voucher Key : </td>
            <td></td>
            <td>
                <asp:TextBox ID="tb_VoucherKey" runat="server" AutoPostBack="True"></asp:TextBox></td>
            <td>
                <asp:Label ID="lb_warning_key" runat="server" Visible="false" CssClass="warning" Text="Voucher Key Đã tồn tại"></asp:Label></td>
        </tr>
        <tr>
            <td>Giá Voucher  : </td>
            <td></td>
            <td>
                <asp:TextBox ID="tb_VoucherPrice" runat="server">0</asp:TextBox>
                <asp:Label ID="Label2" runat="server" Text="(VNĐ)"></asp:Label></td>
            <td>
                <asp:Label ID="lb_warning_Price" runat="server" Visible="false" CssClass="warning" Text="Vui lòng nhập giá"></asp:Label>
            </td>
        </tr>
       <tr>
            <td>Trạng thái</td>
            <td></td>
            <td>
                <asp:DropDownList ID="BoxStatus" runat="server">
                    <asp:ListItem>True</asp:ListItem>
                    <asp:ListItem>False</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td></td>
       </tr>
        <tr>
            <td>Ngày bắt đầu : </td>
            <td></td>
            <td>
                <asp:Calendar ID="Date_Begin" runat="server" BackColor="White" 
                    BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" 
                    Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" 
                    Width="200px">
                    <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                    <NextPrevStyle VerticalAlign="Bottom" />
                    <OtherMonthDayStyle ForeColor="#808080" />
                    <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                    <SelectorStyle BackColor="#CCCCCC" />
                    <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
                    <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <WeekendDayStyle BackColor="#FFFFCC" />
                </asp:Calendar>
                </td>
                <td></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>Ngày kết thúc : </td>
            <td></td>
            <td>
                <asp:Calendar ID="Date_End" runat="server" BackColor="White" 
                    BorderColor="#999999" CellPadding="4" Font-Names="Verdana" Font-Size="8pt" 
                    ForeColor="Black" Height="180px" Width="200px">
                    <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                    <NextPrevStyle VerticalAlign="Bottom" />
                    <OtherMonthDayStyle ForeColor="#808080" />
                    <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                    <SelectorStyle BackColor="#CCCCCC" />
                    <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
                    <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <WeekendDayStyle BackColor="#FFFFCC" />
                </asp:Calendar>
            </td>
            <td></td>
        </tr>
        </tbody></table>
    </div>
    <div class="buttons">
        <table>
          <tbody><tr>
            <td width="130px">
                <asp:HyperLink ID="bt_Cancel" NavigateUrl="/Gui" CssClass="button1" runat="server"><span>Hủy</span></asp:HyperLink>
            </td>
            <td width="130px" align="center">
                <asp:LinkButton ID="bt_Random" CssClass="button1" runat="server" Width="80px" onclick="OnRandom"
                    ><span>Random</span></asp:LinkButton>
            </td>
            <td align="center">
                <asp:LinkButton ID="bt_Submit" CssClass="button1" runat="server" Width="70px" onclick="OnSubmit">
                        <asp:Label ID="lb_Submit" runat="server" Text="Thêm"></asp:Label></asp:LinkButton>
             </td>
          </tr>
        </tbody></table>
      </div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="ContentButtom" runat="server">
<h1> Dánh sách Voucher </h1>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Contentlist" runat="server">
    <asp:GridView ID="listVoucher" runat="server" AutoGenerateColumns="False" 
        CssClass="cart" AllowPaging="True" GridLines="None" 
        onpageindexchanging="listVoucher_PageIndexChanging" PageSize="2">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="Voucher_ID" 
                DataNavigateUrlFormatString="/Gui/Voucher.aspx?id={0}" 
                DataTextField="Voucher_Key" HeaderText="Voucher Key" >
            <ControlStyle ForeColor="#FF6600" />
            </asp:HyperLinkField>
            <asp:BoundField DataField="Voucher_Price" HeaderText="Giá" 
                SortExpression="Voucher_Price" />
            <asp:BoundField DataField="Begin_Date" HeaderText="Ngày bắt đầu" 
                SortExpression="Begin_Date" />
            <asp:BoundField DataField="End_Date" HeaderText="Ngày kết thúc" 
                SortExpression="End_Date" />
            <asp:BoundField DataField="Status" HeaderText="Trạng thái" 
                SortExpression="Status" />
        </Columns>
    </asp:GridView>
</asp:Content>

